package com.projectxxxxxxxxxx.ui;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.projectxxxxxxxxxx.R;
import com.projectxxxxxxxxxx.toggle.Toggle;

public class ToggleActivity extends Activity {

	Button gps;
	Button wifi;
	Button bluetooth;
	Button silent;
	// Button vibrate;
	Button autoRotate;
	// Button reboot;
	Button flashLight;
	Button mobile;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.toggle_activity);

		gps = (Button) findViewById(R.id.gps);
		wifi = (Button) findViewById(R.id.wifi);
		bluetooth = (Button) findViewById(R.id.bluetooth);
		silent = (Button) findViewById(R.id.silent);
		// vibrate = (Button) findViewById(R.id.vibrate);
		autoRotate = (Button) findViewById(R.id.auto_rotate);
		// reboot = (Button) findViewById(R.id.reboot);
		flashLight = (Button) findViewById(R.id.flash_light);
		mobile = (Button) findViewById(R.id.mobile);
	}

	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.gps:
			Toggle.GPS.toggle();
			break;
		case R.id.wifi:
			Toggle.WIFI.toggle();
			break;
		case R.id.bluetooth:
			Toggle.BLUETOOTH.toggle();
			break;
		case R.id.silent:
			Toggle.SILENT.toggle();
			break;
		case R.id.auto_rotate:
			Toggle.AUTO_ROTATE.toggle();
			break;
		case R.id.flash_light:
			Toggle.FLASH_LIGHT.toggle();
			break;
		case R.id.mobile:
			Toggle.MOBILE.toggle();
			break;
		default:
			break;
		}
	}
}
